
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({  
  routes: [
    {
      path: '/index', // 首页
      name: 'index',  
      component: () => import('@/view/index.vue'),  
      meta: { title: '游戏点卷自主兑换', icon: 'dashboard' },  
    },
    {
      path: '/prepareTopup', // 准备充值
      name: 'prepareTopup',  
      component: () => import('@/view/prepareTopup.vue'),  
      meta: { title: '游戏点卷自主兑换', icon: 'dashboard' },  
    },
    {   
      path: '/searchRecord', // 兑换记录查询
      name: 'searchRecord',  
      component: () => import('@/view/searchRecord.vue'),  
      meta: { title: '游戏点卷自主兑换', icon: 'dashboard' },  
    }
  ]  
})
router.afterEach(to => {
  document.title = to.meta.title || '默认标题'
})
export default router
